

<php> if(\Think\Hook::get('adminEditor') && MODULE_NAME == 'Admin'){</php>
<label class="textarea">
    <textarea name="{$name}" id="{$id}">{$default}</textarea>
    {:hook('adminEditor', array('id'=>$id,'value'=>$default))}
</label>

<php>}elseif(\Think\Hook::get('editor')){</php>

<label class="textarea">
    <textarea name="{$name}" id="{$id}">{$default}</textarea>
    {:hook('editor', array('id'=>$id,'value'=>$default))}
</label>

<php>}else{</php>

	<textarea id="simditor" placeholder="MuuCmf" autofocus class="hidden"></textarea>
	<php>if(!$param['is_load_script']){</php>

	<link rel="stylesheet" type="text/css" href="__PUBLIC__/lib/simditor-2.3.15/styles/simditor.css" />

	
	<script type="text/javascript" src="__PUBLIC__/lib/simditor-2.3.15/scripts/module.js"></script>
	<script type="text/javascript" src="__PUBLIC__/lib/simditor-2.3.15/scripts/hotkeys.js"></script>
	<script type="text/javascript" src="__PUBLIC__/lib/simditor-2.3.15/scripts/uploader.js"></script>
	<script type="text/javascript" src="__PUBLIC__/lib/simditor-2.3.15/scripts/simditor.js"></script>
	<script>
	$(function(){
        Simditor.locale = 'zh-CN';//设置中文
        var editor = new Simditor({
            textarea: $('#simditor'),  //textarea的id
            placeholder: '这里输入文字...',
            {$config}, //工具条都包含哪些内容,后端传递参数
            //pasteImage: true,//允许粘贴图片
            defaultImage: 'images/image.png',//编辑器插入的默认图片，此处可以删除
            upload : {
                url : 'richtext_img_upload.do', //文件上传的接口地址
                params: null, //键值对,指定文件上传接口的额外参数,上传的时候随文件一起提交
                fileKey: 'upload_file', //服务器端获取文件数据的参数名
                connectionCount: 3,
                leaveConfirm: '正在上传文件'
            }
        });
    })
	</script>
	<php>}</php>
<php>}</php>